home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_curl.idb / usr / freeware / bin / curl-config.z / curl-config
Text File  |  2002-07-08  |  3KB  |  119 lines

  1. #! /bin/sh
  2. #
  3. # The idea to this kind of setup info script was stolen from numerous
  4. # other packages, such as neon, libxml and gnome.
  5. #
  6. # $Id: curl-config.in,v 1.13 2002/06/11 11:13:29 bagder Exp $
  7. #
  8. prefix=${ROOT}/usr/freeware
  9. exec_prefix=${prefix}
  10. includedir=${prefix}/include
  11.  
  12. usage()
  13. {
  14.     cat <<EOF
  15. Usage: curl-config [OPTION]
  16.  
  17. Available values for OPTION include:
  18.  
  19.   --cc        compiler
  20.   --cflags    pre-processor and compiler flags
  21.   --feature   newline separated list of enabled features
  22.   --help      display this help and exit
  23.   --libs      library linking information
  24.   --prefix    curl install prefix
  25.   --version   output version information
  26.   --vernum    output the version information as a number (hexadecimal)
  27. EOF
  28.  
  29.     exit $1
  30. }
  31.  
  32. if test $# -eq 0; then
  33.     usage 1
  34. fi
  35.  
  36. while test $# -gt 0; do
  37.     case "$1" in
  38.     # this deals with options in the style
  39.     # --option=value and extracts the value part
  40.     # [not currently used]
  41.     -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  42.     *) value= ;;
  43.     esac
  44.  
  45.     case "$1" in
  46.     --cc)
  47.     echo sgifwcompile -e -q -nostdinc -I. -I${ROOT}/usr/freeware/include -I${ROOT}/usr/include -O3 -OPT:Olimit=0:space=ON -DEBUG:optimize_space=on  -TENV:X=1 -CG:unique_exit=on  -OPT:IEEE_arithmetic=1:roundoff=0:wrap_around_unsafe_opt=off -n32 -mips3 -nostdlib -L${ROOT}/usr/freeware/${ABILIB-lib32}  -L${ROOT}/usr/lib32 -woff 1009,1014,1107,1110,1116,1164,1185,1188,1204,1230,1233  -Wl,-woff,85,-woff,84 -rpath ${ROOT}/usr/freeware/${ABILIB-lib32} -- /hosts/babylon.engr/usr/dist/new_toolroots/6.5/products/freeware/latest/ptoolroot/usr/bin/cc
  48.     ;;
  49.  
  50.     --prefix)
  51.     echo $prefix
  52.     ;;
  53.  
  54.     --feature)
  55.     if test "" = "1"; then
  56.           echo "SSL"
  57.         fi
  58.     if test "" = "1"; then
  59.           echo "KRB4"
  60.         fi
  61.     if test "" = "1"; then
  62.           echo "IPv6"
  63.         fi
  64.     if test "" = "1"; then
  65.           echo "HTTP-disabled"
  66.         fi
  67.     if test "" = "1"; then
  68.           echo "FTP-disabled"
  69.         fi
  70.     if test "" = "1"; then
  71.           echo "GOPHER-disabled"
  72.         fi
  73.     if test "" = "1"; then
  74.           echo "FILE-disabled"
  75.         fi
  76.     if test "" = "1"; then
  77.           echo "TELNET-disabled"
  78.         fi
  79.     if test "" = "1"; then
  80.           echo "LDAP-disabled"
  81.         fi
  82.     if test "" = "1"; then
  83.           echo "DICT-disabled"
  84.         fi
  85.     ;;
  86.  
  87.     --version)
  88.     echo libcurl 7.9.8
  89.     exit 0
  90.     ;;
  91.  
  92.     --vernum)
  93.     echo 070908
  94.     exit 0
  95.     ;;
  96.  
  97.     --help)
  98.     usage 0
  99.     ;;
  100.  
  101.     --cflags)
  102.            echo -I${prefix}/include
  103.            ;;
  104.  
  105.     --libs)
  106.            echo -L${ROOT}/usr/freeware/${ABILIB-lib32} -lcurl  
  107.            ;;
  108.  
  109.     *)
  110.         echo "unknown option: $1"
  111.     usage
  112.     exit 1
  113.     ;;
  114.     esac
  115.     shift
  116. done
  117.  
  118. exit 0
  119.